/* import request from './request.js'; */
import fetch from "./request.js";

// ------------1.批发市场-------------
// 新增批发市场
export function addFarmMarket(data) {
  return fetch("/nb-pc/1.0.1/FarmMarketService/addFarmMarket", {
    method: "post",
    data: data,
    withLoading: true
  });
}
// 删除批发市场
export function deleteFarmMarket(data) {
  return fetch("/nb-pc/1.0.1/FarmMarketService/deleteFarmMarket", {
    method: "post",
    data: data,
    withLoading: true
  });
}
// 导入批发市场
// export function importFarmMarket(data) {
//   return fetch("/nb-pc/1.0.1/FarmMarketService/importFarmMarket", {
//     method: "post",
//     data: data,
//   });
// }
// 查询批发市场列表（用于查询筛选条件）
// export function queryFarmMarketList(data) {
//   return fetch("/nb-pc/1.0.1/FarmMarketService/queryFarmMarketList", {
//     method: "post",
//     data: data,
//   });
// }
// 分页查询批发市场列表
export function queryFarmMarketPage(data) {
  return fetch("/nb-pc/1.0.1/FarmMarketService/queryFarmMarketPage", {
    method: "post",
    data: data,
  });
}
// 修改批发市场
export function updateFarmMarket(data) {
  return fetch("/nb-pc/1.0.1/FarmMarketService/updateFarmMarket", {
    method: "post",
    data: data,
    withLoading: true
  });
}

// ------------2.农产品品类-------------
// 新增农产品品类
export function addProduceCategory(data) {
  return fetch("/nb-pc/1.0.1/ProduceCategoryService/addProduceCategory", {
    method: "post",
    data: data,
    withLoading: true
  });
}
// 导入农产品品类
// export function importProduceCategory(data) {
//   return fetch("/nb-pc/1.0.1/ProduceCategoryService/importProduceCategory", {
//     method: "post",
//     data: data,
//   });
// }
// // 查询农产品品类列表（不分页，用于前端获取品类缓存）
// export function queryProduceCategoryList(data) {
//   return fetch("/nb-pc/1.0.1/ProduceCategoryService/queryProduceCategoryList", {
//     method: "post",
//     data: data,
//   });
// }
// 查询农产品品类树
export function queryProduceCategoryTree(data) {
  return fetch("/nb-pc/1.0.1/ProduceCategoryService/queryProduceCategoryTree", {
    method: "post",
    data: data,
  });
}
// 分页查询农产品品类
export function queryProduceCategoryPage(data) {
  return fetch("/nb-pc/1.0.1/ProduceCategoryService/queryProduceCategoryPage", {
    method: "post",
    data: data,
  });
}
// 修改农产品品类
export function updateProduceCategory(data) {
  return fetch("/nb-pc/1.0.1/ProduceCategoryService/updateProduceCategory", {
    method: "post",
    data: data,
    withLoading: true
  });
}
// 删除（批量删除）农产品品类
export function deleteProduceCategory(data) {
  return fetch("/nb-pc/1.0.1/ProduceCategoryService/deleteProduceCategory", {
    method: "post",
    data: data,
    withLoading: true
  });
}

// ------------3.农产品-------------
// 新增农产品
export function addAgroProduce(data) {
  return fetch("/nb-pc/1.0.1/AgroProduceService/addAgroProduce", {
    method: "post",
    data: data,
    withLoading: true
  });
}
// 删除（批量删除）农产品
export function deleteAgroProduce(data) {
  return fetch("/nb-pc/1.0.1/AgroProduceService/deleteAgroProduce", {
    method: "post",
    data: data,
    withLoading: true
  });
}
// // 批量导入农产品
// export function importAgroProduce(data) {
//   return fetch("/nb-pc/1.0.1/AgroProduceService/importAgroProduce", {
//     method: "post",
//     data: data,
//   });
// }
// 分页查询农产品
export function queryAgroProduceList(data) {
  return fetch("/nb-pc/1.0.1/AgroProduceService/queryAgroProduceList", {
    method: "post",
    data: data,
  });
}
// 修改农产品
export function updateAgroProduce(data) {
  return fetch("/nb-pc/1.0.1/AgroProduceService/updateAgroProduce", {
    method: "post",
    data: data,
    withLoading: true
  });
}

// ------------5.农产品行情-------------
// 新增农产品行情
export function addProducePrice(data) {
  return fetch("/nb-pc/1.0.1/ProducePriceService/addProducePrice", {
    method: "post",
    data: data,
    withLoading: true
  });
}
// 导入农产品行情
// export function importProducePrice(data) {
//   return fetch("/nb-pc/1.0.1/ProducePriceService/importProducePrice", {
//     method: "post",
//     data: data,
//   });
// }
// 分页查询农产品行情
export function queryProducePriceList(data) {
  return fetch("/nb-pc/1.0.1/ProducePriceService/queryProducePriceList", {
    method: "post",
    data: data,
  });
}
// 更新农产品行情
export function updateProducePrice(data) {
  return fetch("/nb-pc/1.0.1/ProducePriceService/updateProducePrice", {
    method: "post",
    data: data,
    withLoading: true
  });
}
// 批量删除农产品行情
export function deleteProducePrice(data) {
  return fetch("/nb-pc/1.0.1/ProducePriceService/deleteProducePrice", {
    method: "post",
    data: data,
    withLoading: true
  });
}

